# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.CloudDeploy.V1.Model.VerifyJobRun do
  @moduledoc """
  VerifyJobRun contains information specific to a verify `JobRun`.

  ## Attributes

  *   `artifactUri` (*type:* `String.t`, *default:* `nil`) - Output only. URI of a directory containing the verify artifacts. This contains the Skaffold event log.
  *   `build` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the Cloud Build `Build` object that is used to verify. Format is `projects/{project}/locations/{location}/builds/{build}`.
  *   `eventLogPath` (*type:* `String.t`, *default:* `nil`) - Output only. File path of the Skaffold event log relative to the artifact URI.
  *   `failureCause` (*type:* `String.t`, *default:* `nil`) - Output only. The reason the verify failed. This will always be unspecified while the verify is in progress or if it succeeded.
  *   `failureMessage` (*type:* `String.t`, *default:* `nil`) - Output only. Additional information about the verify failure, if available.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :artifactUri => String.t() | nil,
          :build => String.t() | nil,
          :eventLogPath => String.t() | nil,
          :failureCause => String.t() | nil,
          :failureMessage => String.t() | nil
        }

  field(:artifactUri)
  field(:build)
  field(:eventLogPath)
  field(:failureCause)
  field(:failureMessage)
end

defimpl Poison.Decoder, for: GoogleApi.CloudDeploy.V1.Model.VerifyJobRun do
  def decode(value, options) do
    GoogleApi.CloudDeploy.V1.Model.VerifyJobRun.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.CloudDeploy.V1.Model.VerifyJobRun do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
